﻿using ChongJu.ModelManager.Camera;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChongJu.Camera
{
    public interface ICameraBase
    {
        /// <summary>
        /// 相机图片返回事件
        /// </summary>
        event Action<Bitmap, DateTime> ImageCallBackEvent;

        bool Init(CameraModel cfg, CloudService.CloudService cloud);

        /// <summary>
        /// 打开相机
        /// </summary>
        /// <returns></returns>
        bool Open();

        /// <summary>
        /// 关闭相机
        /// </summary>
        /// <returns></returns>
        bool Close();

        void TriggerBySoftware();

        void SetTriggerByLine(int idx = 0);

        void SetTriggerBySoftware();

        void SetParams(CameraModel cfg, bool setWidthAndHeight);

        string SetCalibrationParms(CameraModel cfg);

        bool OpenLine1CloseLine2();

        bool OpenLine2CloseLine1();

        void Start();

        void Stop();
    }
}
